package com.cardone.api.support;

import com.cardone.common.cache.util.CacheUtils;

/**
 * Created by Administrator on 2015/3/3.
 */
@lombok.extern.slf4j.Slf4j
public class GetWebPackageServiceDefaultSupport implements GetWebPackageServiceSupport {
    @Override
    public WebPackageServiceSupport execution(String beanId) {
        if (log.isDebugEnabled()) {
            return ExecutionPackageServiceDefaultSupport.loadPackageServiceSupport(beanId);
        }

        return CacheUtils.get(GetWebPackageServiceSupport.class.getName(), beanId, key -> ExecutionPackageServiceDefaultSupport.loadPackageServiceSupport(beanId));
    }
}